package org.smr.ministore.micro.client;

import java.util.List;

import org.blade.utils.Pager;
import org.smr.ministore.entities.GoodsType;
import org.smr.ministore.entities.vo.Assign2OrgansVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("goods.GoodsType")
public interface FeignGoodsTypeMicroServiceClient {

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsType/batchSave")
    int batchSave(@RequestBody List< GoodsType> entities);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsType/batchModify")
    int batchModify(@RequestBody List< GoodsType> entities);

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsType/save")
    public int save(@RequestBody GoodsType entity) ;

    @RequestMapping(method = RequestMethod.PATCH, value = "/GoodsType/updateById")
    public int updateById(@RequestBody GoodsType id);

    @RequestMapping(method = RequestMethod.GET, value = "/GoodsType/queryById/{id}")
    public  GoodsType queryById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/GoodsType/deleteById/{id}")
    public int deleteById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsType/paginate")
    public Pager<GoodsType> paginate( @RequestBody GoodsType entity, Long pageSize, Long pageNum);

    @RequestMapping( method = RequestMethod.POST, value = "/GoodsType/getGoodsTypeTree")
    public List<GoodsType> getGoodsTypeTree(@RequestBody GoodsType goodsType);

    @ResponseBody
    @RequestMapping(method = RequestMethod.DELETE, value = "/GoodsType/assignToOrgans")
    public int assignToOrgans(@RequestBody Assign2OrgansVO assign2Organs);
}
